1. Field of the Invention
The present invention relates to an encoder for detecting a rotational angular position of a motor, a position of a moving worktable, and the like. More specifically, the present invention relates to an encoder signal interpolation divider that automatically corrects errors in the offset, gain level, and gain balance of an input signal at a high speed with a low cost circuit configuration, and can accurately generate an encoder signal having a predetermined resolution by interpolation division.
2. Description of the Related Art
A sensor of an encoder generally outputs two-phase signals composed of A-phase signals (sinusoidal signals) and B-phase signals (cosinusoidal signals). In a rotary encoder, for example, the output voltages A and B of these signals *A and *B areA=K sin θB=K cos θin accordance with the rotational angle θ of the rotational shaft of the detection object. If the values A and B at a certain moment are respectively designated as a and b, the angle θ (electrical angle) at that moment can be read from the values a and b, as shown in FIG. 1. Based on the angle θ thus read, two-phase encoder pulse signals having a predetermined resolution can be generated, and the mechanical angle of the rotational shaft can be detected based on such pulse signals.
In encoders for generating two-phase encoder pulse signals with a predetermined resolution on the basis of two-phase sinusoidal signals, an interpolation division system using A/D conversion is known as a technique for electrically processing and enhancing the resolution of two-phase sinusoidal signals (sinusoidal signal and cosinusoidal signal) The system is disclosed in JP-A 49-106744.
Here, angle θ is calculated based on the assumption that the central value of the voltage and the maximum amplitude of A-phase and B-phase signals obtained from the sensor of an encoder are constant. In an actual encoder, however, the balance of the output voltage of each phase may be disrupted or variations may be induced in the center voltage values thereof by shifts in the mechanical position, temperature-induced fluctuations in the electrical circuit constant, or the like. (The former is referred to as “gain balance,” and the latter is referred to as “offset balance.”)
For example, if the offset balance changes 2%, the calculated error is 2.3° (electrical angle error). In actual encoders, several thousands to several tens of thousands of reference signals are output when a rotational shaft rotates once, the shaft conversion error (mechanical angle error) is calculated by the equation below, and the error is 0.5 arc-sec when the offset balance changes 2% in an encoder in which the number of reference pulses is 18,000.(Mechanical angle error)=(Electrical angle error)/(Number of signal outputs per rotation)
The resolution by interpolation division is normally 100 to 400 times the number of reference pulses, so if it is assumed that an encoder output of 18,000 pulses is divided to become 200 times greater, then the resolution will be 3,600,000 pulses, and one pulse will correspond to 0.36 arc-sec. The offset error calculated above is an error of one or more pulses, so the offset error must be compensated.
A system for compensating for fluctuations in the A-phase and B-phase signals is described, for example, in JP-A 6-167354. In the interpolation processing device cited therein, the correction value of the offset gain is added to a digital value obtained by converting the input signal from analog to digital format, and offset correction is performed. Thus, in the interpolation processing device, correction processing for the input signal is realized with a digital circuit.